using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;

/// <summary>
/// Summary description for CategoryBus
/// </summary>
public class CategoryBus
{
    public CategoryBus() { }

    public DataTable LoadAll()
    {
        return new CategoryDao().LoadAll();
    }

    public DataTable LoadCategories(decimal parentID)
    {
        return new CategoryDao().LoadCategories(parentID);
    }

    public List<Category> GetListByParentID(decimal parentID)
    {
        return new CategoryDao().GetListByParentID(parentID);
    }

    public DataTable LoadLeafCategories()
    {
        return new CategoryDao().LoadLeafCategories();
    }

    public bool Delete(decimal catID, ref string err)
    {
        return new CategoryDao().Delete(catID, ref err);
    }

    public void Update(Category dto)
    {
        new CategoryDao().Update(dto);
    }

    public bool Add(Category dto)
    {
        return new CategoryDao().Add(dto);
    }
}
